package cn.codenest.springboot.mongo.dao;


import cn.codenest.springboot.mongo.entity.UserEntity;

public interface UserDAO {
    /**
     * @author: Zhihui.Liu
     * @datm: 2021/11/16 17:34
     * @Description: 保存用戶
     * @param:
     * @return:
     *
     */
    void saveUser(UserEntity user);
    /**
     * @author: Zhihui.Liu
     * @datm: 2021/11/16 17:34
     * @Description: 刪除用戶
     * @param:
     * @return:
     *
     */
    void removeUser(Long id);
    /**
     * @author: Zhihui.Liu
     * @datm: 2021/11/16 17:34
     * @Description: 根據用戶名查找用戶
     * @param:
     * @return:
     *
     */
    UserEntity findUserByName(String name);
    /**
     * @author: Zhihui.Liu
     * @datm: 2021/11/16 17:34
     * @Description: 更新用戶的某些字段
     * @param:
     * @return:
     *
     */
    int updateUser(UserEntity user);
}
